package com.h1909d.weinfo.presenter;

import com.h1909d.weinfo.base.BasePresenter;
import com.h1909d.weinfo.bean.SectionsBean;
import com.h1909d.weinfo.model.SectionsModel;
import com.h1909d.weinfo.net.ResultCallBack;
import com.h1909d.weinfo.view.DailyNewsView;
import com.h1909d.weinfo.view.SectionsView;

public class SectionsPresenter extends BasePresenter<SectionsView> {

    private SectionsModel sectionsModel;

    @Override
    protected void initModel() {
        addModel(sectionsModel);
        sectionsModel = new SectionsModel();
    }

    public void getLastesSection() {
        sectionsModel.getLatestSection(new ResultCallBack<SectionsBean>() {
            @Override
            public void onSuccess(SectionsBean sectionsBean) {
                mView.setData(sectionsBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}
